package model.vo
{
	import com.google.maps.LatLng;
	
	import utils.DeviceParser;

	public class MarkerInfoVO
	{
		private var addressTextStr : String = "";
		public function MarkerInfoVO()
		{
		}
		
		/**
		 * 创建tooltips
		 **/
		private function createLocationTooltipStr( deviceVO:DeviceVO ):void
		{
			var toolTipStr : String = "";
			if(deviceVO != null)
			{					
				var endLatLng:LatLng = new LatLng(deviceVO.latitude,deviceVO.longitude);
				
				var infoList : Array = deviceVO.status_text;
				var infoParser : DeviceParser = new DeviceParser(deviceVO);
				//准备备注信息
				toolTipStr  = "";
				toolTipStr += " 时间: "+Global.getTimeStrByTime(deviceVO.dateline, true ) + " \n" ;
				toolTipStr += " 方向: "+infoParser.getDirection() + "\n" ;
				toolTipStr +=  " 时速: "+infoParser.getSpeed() + "KM/h\n" ;
				toolTipStr += " 经度: "+infoParser.getLng() + "\n" ;
				toolTipStr += " 纬度: "+infoParser.getLat() + "\n" ;
				toolTipStr += " 地址: " + addressTextStr + " \n" ;
				
				var tempStr : String = "";
				if(infoList != null)
				{
					for (var ii:int=0;ii<infoList.length;ii++)
					{
						tempStr += infoList[ii] + " " ;
					}
					toolTipStr += " 状态: " + tempStr + "\n";
				}
				
//				this.toolTip = toolTipStr;
			}	
		}
	}
}